/*******************************************************************************
StringKit.h

	Author:		LiuDingXi
	e-mail:		liudx@gmail.com
	Date time:	2009-08-07

	Copyright (C) 2009
	All rights reserved.
	
*******************************************************************************/

#ifndef _STRINGKIT_H_
#define _STRINGKIT_H_

#include "SceneDat.h"
#include "SpriteKit.h"
#include "Coder.h"

class CStringKit : public CBaseParser
{
public:
	CStringKit();
	virtual ~CStringKit();
	
public:
	BOOL	Load(CArchive& ar);
	BOOL	Store(CArchive& ar);

	BOOL	Free();

	BOOL	SaveDat(LPCTSTR szOutput);

public:
	enum {eID, eText, eColor, eSize, eFont,
		eBold, eItalic, eUnderline, eCount};

	typedef CSpriteKit::IMAGE IMAGE;
	
	struct SNODE
	{
		CString szField[eCount];
		
		IMAGE*		pImage;
		SNODE*		pNext;

		SNODE()
		{
			pImage = NULL;
			pNext = NULL;
		}
		~SNODE()
		{
			delete pImage;
		}
	};

	CString	m_szName;

protected:

	SNODE* m_pHead;
	SNODE* m_pTail;

};

#endif//_STRINGKIT_H_
